#tag Class
Class NSHost
Inherits NSObject
	#tag Method, Flags = &h21
		Private Shared Function ClassRef() As Ptr
		  
		  static ref as Ptr = Cocoa.NSClassFromString("NSHost")
		  return ref
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function CreateWithAddress(address as String) As NSHost
		  
		  #if targetMacOS
		    declare function hostWithAddress lib CocoaLib selector "hostWithAddress:" (class_id as Ptr, address as CFStringRef) as Ptr
		    
		    dim hostRef as Ptr = hostWithAddress(ClassRef, address)
		    if hostRef <> nil then
		      return new NSHost(hostRef)
		    end if
		    
		  #else
		    #pragma unused address
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function CreateWithName(name as String) As NSHost
		  
		  #if targetMacOS
		    declare function hostWithName lib CocoaLib selector "hostWithName:" (class_id as Ptr, name as CFStringRef) as Ptr
		    
		    dim hostRef as Ptr = hostWithName(ClassRef, name)
		    if hostRef <> nil then
		      return new NSHost(hostRef)
		    end if
		    
		  #else
		    #pragma unused name
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		 Shared Function CurrentHost() As NSHost
		  
		  #if targetMacOS
		    declare function currentHost lib CocoaLib selector "currentHost" (class_id as Ptr) as Ptr
		    
		    dim hostRef as Ptr = currentHost(ClassRef)
		    if hostRef <> nil then
		      return new NSHost(hostRef)
		    end if
		    
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		Function isEqual(otherHost as NSHost) As Boolean
		  
		  #if targetMacOS
		    declare function isEqualToHost lib CocoaLib selector "isEqualToHost:" (obj_id as Ptr, otherHost as Ptr) as Boolean
		    
		    dim hostRef as Ptr
		    if otherHost <> nil then
		      hostRef = otherHost
		    end if
		    
		    return isEqualToHost(self, hostRef)
		    
		  #else
		    #pragma unused otherHost
		  #endif
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		Function Operator_Convert() As String
		  
		  return self.Address
		  
		End Function
	#tag EndMethod

	#tag Method, Flags = &h0
		Function VariantValue() As Variant
		  
		  return self.Address
		  
		End Function
	#tag EndMethod


	#tag ComputedProperty, Flags = &h0
		#tag Getter
			Get
			  
			  #if targetMacOS
			    declare function address lib CocoaLib selector "address" (obj_id as Ptr) as CFStringRef
			    
			    return address(self)
			    
			  #endif
			  
			End Get
		#tag EndGetter
		Address As String
	#tag EndComputedProperty

	#tag ComputedProperty, Flags = &h0
		#tag Getter
			Get
			  
			  #if targetMacOS
			    declare function addresses lib CocoaLib selector "addresses" (obj_id as Ptr) as Ptr
			    
			    dim arrayRef as Ptr = addresses(self)
			    if arrayRef <> nil then
			      return new NSArray(arrayRef)
			    end if
			    
			  #endif
			  
			End Get
		#tag EndGetter
		Addresses As NSArray
	#tag EndComputedProperty

	#tag ComputedProperty, Flags = &h0
		#tag Getter
			Get
			  
			  #if targetMacOS
			    declare function localizedName lib CocoaLib selector "localizedName" (obj_id as Ptr) as CFStringRef
			    
			    return localizedName(self)
			    
			  #endif
			  
			End Get
		#tag EndGetter
		LocalizedName As String
	#tag EndComputedProperty

	#tag ComputedProperty, Flags = &h0
		#tag Getter
			Get
			  
			  #if targetMacOS
			    declare function name lib CocoaLib selector "name" (obj_id as Ptr) as CFStringRef
			    
			    return name(self)
			    
			  #endif
			  
			End Get
		#tag EndGetter
		Name As String
	#tag EndComputedProperty

	#tag ComputedProperty, Flags = &h0
		#tag Getter
			Get
			  
			  #if targetMacOS
			    declare function names lib CocoaLib selector "names" (obj_id as Ptr) as Ptr
			    
			    dim arrayRef as Ptr = names(self)
			    if arrayRef <> nil then
			      return new NSArray(arrayRef)
			    end if
			    
			  #endif
			  
			End Get
		#tag EndGetter
		Names As NSArray
	#tag EndComputedProperty


	#tag ViewBehavior
		#tag ViewProperty
			Name="Address"
			Group="Behavior"
			Type="String"
			EditorType="MultiLineEditor"
		#tag EndViewProperty
		#tag ViewProperty
			Name="Description"
			Group="Behavior"
			Type="String"
			EditorType="MultiLineEditor"
			InheritedFrom="NSObject"
		#tag EndViewProperty
		#tag ViewProperty
			Name="Index"
			Visible=true
			Group="ID"
			InitialValue="-2147483648"
			InheritedFrom="Object"
		#tag EndViewProperty
		#tag ViewProperty
			Name="Left"
			Visible=true
			Group="Position"
			InitialValue="0"
			InheritedFrom="Object"
		#tag EndViewProperty
		#tag ViewProperty
			Name="LocalizedName"
			Group="Behavior"
			Type="String"
			EditorType="MultiLineEditor"
		#tag EndViewProperty
		#tag ViewProperty
			Name="Name"
			Visible=true
			Group="ID"
			InheritedFrom="Object"
		#tag EndViewProperty
		#tag ViewProperty
			Name="Super"
			Visible=true
			Group="ID"
			InheritedFrom="Object"
		#tag EndViewProperty
		#tag ViewProperty
			Name="Top"
			Visible=true
			Group="Position"
			InitialValue="0"
			InheritedFrom="Object"
		#tag EndViewProperty
	#tag EndViewBehavior
End Class
#tag EndClass
